﻿using AleaBelli.Core.Service;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace AleaBelli.Model
{
    /// <summary>
    /// View Model
    /// </summary>
    public class GameViewModel
    {
        public event PropertyChangedEventHandler PropertyChanged;

        public GameViewModel()
        {
            Name = "hello";
        }

        public IGameService Service
        {
            get;
            set;
        }

        public ModelHex[,] Map
        {
            get;
            set;
        }

        public string Name
        {
            get;
            set;
        }

        protected virtual void RaisePropertyChanged(string propertyName)
        {
            var handler = this.PropertyChanged;
            if (handler != null)
            {
                handler(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        internal void OnMouseUp(ModelHex hex)
        {
            MessageBox.Show("Click" + hex.Terrain.ToString());
        }
    }
}
